<!doctype html>
<html lang="zh-CN">
<head>

    <meta charset="utf-8">
    <meta name="generator" content="Hugo 0.74.1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>flutter cupertino 复制粘贴弹窗报错的问题 | caijinglong的博客</title>
    <meta property="og:title" content="flutter cupertino 复制粘贴弹窗报错的问题 - caijinglong的博客">
    <meta property="og:type" content="article">
        
    <meta property="article:published_time" content="2019-01-08T17:34:10&#43;08:00">
        
        
    <meta property="article:modified_time" content="2019-01-08T17:34:10&#43;08:00">
        
    <meta name="Keywords" content="golang,go语言,flutter,caijinglong,java,android,博客,项目管理,python,软件架构,公众号,小程序">
    <meta name="description" content="flutter cupertino 复制粘贴弹窗报错的问题">
        
    <meta name="author" content="caijinglong">
    <meta property="og:url" content="http://www.kikt.top/posts/flutter/framework/cupertino-paste-tooltip/">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">

    <link rel="stylesheet" href="/css/normalize.css">
    
        <link rel="stylesheet" href="/css/prism.css">
    
    <link rel="stylesheet" href="/css/style.css">
    <script type="text/javascript" src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>

    

   
    <script>
        (function(){
            var bp = document.createElement('script');
            var curProtocol = window.location.protocol.split(':')[0];
            if (curProtocol === 'https') {
                bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
            }
            else {
                bp.src = 'http://push.zhanzhang.baidu.com/push.js';
            }
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(bp, s);
        })();
    </script>

    
    
</head>

<body>
<header id="header" class="clearfix">
    <div class="container">
        <div class="col-group">
            <div class="site-name ">
                
                    <a id="logo" href="http://www.kikt.top">
                        caijinglong的博客
                    </a>
                
                <p class="description">Android/Flutter开发者，对于golang/python/ios/java 均有所了解</p>
            </div>
            <div>
                <nav id="nav-menu" class="clearfix">
                    <a class="" href="http://www.kikt.top">首页</a>
                    
                    <a  href="http://www.kikt.top/archives/" title="归档">归档</a>
                    
                    <a  href="http://www.kikt.top/contact/" title="接单">接单</a>
                    
                    <a  href="http://www.kikt.top/about/" title="关于">关于</a>
                    
                </nav>
            </div>
        </div>
    </div>
</header>


<div id="body">
    <div class="container">
        <div class="col-group">

            <div class="col-8" id="main">
                <div class="res-cons">
                    <article class="post">
                        <header>
                            <h1 class="post-title">flutter cupertino 复制粘贴弹窗报错的问题</h1>
                        </header>
                        <date class="post-meta meta-date">
                            2019年1月8日
                        </date>
                        
                        <div class="post-meta meta-category">
                            |
                            
                                <a href="http://www.kikt.top/categories/flutter">flutter</a>
                            
                        </div>
                        
                        
                        <div class="post-meta">
                            <span id="busuanzi_container_page_pv">|<span id="busuanzi_value_page_pv"></span><span> 阅读</span></span>
                        </div>
                        
                        <div class="post-content">
                            <pre><code class="language-log" data-lang="log">NosuchMethodError: The getter 'pasterButtonLabel' was called on null.
Receiver: null
Tried calling: pasteButtonLabel
</code></pre><p>在最近 app store 提交审核时被拒了,然后得到了一个这样的截图</p>
<p><img src="https://gitee.com/kikt-blog/blog-image/raw/master/weibo/844036b9ly1fz0dzr23haj20v609e0vz.jpg" alt="图片"></p>
<p>在 flutter 中可能会会出现各种问题,因为之前遇到过这个问题,但是那是我另一个应用,这个忘了设置了</p>
<p>我快速搞了一下,重新提交了审核</p>
<h2 id="解决方式">解决方式</h2>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:flutter/cupertino.dart&#39;</span>;
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:flutter/foundation.dart&#39;</span>;
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:flutter/material.dart&#39;</span>;
<span style="color:#66d9ef">import</span> <span style="color:#e6db74">&#39;package:flutter_localizations/flutter_localizations.dart&#39;</span>;

<span style="color:#66d9ef">class</span> <span style="color:#a6e22e">ChineseCupertinoLocalizations</span> <span style="color:#66d9ef">implements</span> CupertinoLocalizations {
  <span style="color:#66d9ef">final</span> materialDelegate <span style="color:#f92672">=</span> GlobalMaterialLocalizations.delegate;
  <span style="color:#66d9ef">final</span> widgetsDelegate <span style="color:#f92672">=</span> GlobalWidgetsLocalizations.delegate;
  <span style="color:#66d9ef">final</span> local <span style="color:#f92672">=</span> <span style="color:#66d9ef">const</span> Locale(<span style="color:#e6db74">&#39;zh&#39;</span>);

  MaterialLocalizations ml;

  Future init() <span style="color:#66d9ef">async</span> {
    ml <span style="color:#f92672">=</span> <span style="color:#66d9ef">await</span> materialDelegate.load(local);
    print(ml.pasteButtonLabel);
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> <span style="color:#66d9ef">get</span> alertDialogLabel <span style="color:#f92672">=&gt;</span> ml.alertDialogLabel;

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> <span style="color:#66d9ef">get</span> anteMeridiemAbbreviation <span style="color:#f92672">=&gt;</span> ml.anteMeridiemAbbreviation;

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> <span style="color:#66d9ef">get</span> copyButtonLabel <span style="color:#f92672">=&gt;</span> ml.copyButtonLabel;

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> <span style="color:#66d9ef">get</span> cutButtonLabel <span style="color:#f92672">=&gt;</span> ml.cutButtonLabel;

  <span style="color:#960050;background-color:#1e0010">@</span>override
  DatePickerDateOrder <span style="color:#66d9ef">get</span> datePickerDateOrder <span style="color:#f92672">=&gt;</span> DatePickerDateOrder.mdy;

  <span style="color:#960050;background-color:#1e0010">@</span>override
  DatePickerDateTimeOrder <span style="color:#66d9ef">get</span> datePickerDateTimeOrder <span style="color:#f92672">=&gt;</span>
      DatePickerDateTimeOrder.date_time_dayPeriod;

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> datePickerDayOfMonth(<span style="color:#66d9ef">int</span> dayIndex) {
    <span style="color:#66d9ef">return</span> dayIndex.toString();
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> datePickerHour(<span style="color:#66d9ef">int</span> hour) {
    <span style="color:#66d9ef">return</span> hour.toString().padLeft(<span style="color:#ae81ff">2</span>, <span style="color:#e6db74">&#34;0&#34;</span>);
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> datePickerHourSemanticsLabel(<span style="color:#66d9ef">int</span> hour) {
    <span style="color:#66d9ef">return</span> <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">$</span>hour<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">+</span> <span style="color:#e6db74">&#34;时&#34;</span>;
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> datePickerMediumDate(DateTime date) {
    <span style="color:#66d9ef">return</span> ml.formatMediumDate(date);
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> datePickerMinute(<span style="color:#66d9ef">int</span> minute) {
    <span style="color:#66d9ef">return</span> minute.toString().padLeft(<span style="color:#ae81ff">2</span>, <span style="color:#e6db74">&#39;0&#39;</span>);
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> datePickerMinuteSemanticsLabel(<span style="color:#66d9ef">int</span> minute) {
    <span style="color:#66d9ef">return</span> <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">$</span>minute<span style="color:#e6db74">&#34;</span> <span style="color:#f92672">+</span> <span style="color:#e6db74">&#34;分&#34;</span>;
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> datePickerMonth(<span style="color:#66d9ef">int</span> monthIndex) {
    <span style="color:#66d9ef">return</span> <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">$</span>monthIndex<span style="color:#e6db74">&#34;</span>;
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> datePickerYear(<span style="color:#66d9ef">int</span> yearIndex) {
    <span style="color:#66d9ef">return</span> yearIndex.toString();
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> <span style="color:#66d9ef">get</span> pasteButtonLabel <span style="color:#f92672">=&gt;</span> ml.pasteButtonLabel;

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> <span style="color:#66d9ef">get</span> postMeridiemAbbreviation <span style="color:#f92672">=&gt;</span> ml.postMeridiemAbbreviation;

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> <span style="color:#66d9ef">get</span> selectAllButtonLabel <span style="color:#f92672">=&gt;</span> ml.selectAllButtonLabel;

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> timerPickerHour(<span style="color:#66d9ef">int</span> hour) {
    <span style="color:#66d9ef">return</span> hour.toString().padLeft(<span style="color:#ae81ff">2</span>, <span style="color:#e6db74">&#34;0&#34;</span>);
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> timerPickerHourLabel(<span style="color:#66d9ef">int</span> hour) {
    <span style="color:#66d9ef">return</span> <span style="color:#e6db74">&#34;</span><span style="color:#e6db74">$</span>hour<span style="color:#e6db74">&#34;</span>.toString().padLeft(<span style="color:#ae81ff">2</span>, <span style="color:#e6db74">&#34;0&#34;</span>) <span style="color:#f92672">+</span> <span style="color:#e6db74">&#34;时&#34;</span>;
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> timerPickerMinute(<span style="color:#66d9ef">int</span> minute) {
    <span style="color:#66d9ef">return</span> minute.toString().padLeft(<span style="color:#ae81ff">2</span>, <span style="color:#e6db74">&#34;0&#34;</span>);
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> timerPickerMinuteLabel(<span style="color:#66d9ef">int</span> minute) {
    <span style="color:#66d9ef">return</span> minute.toString().padLeft(<span style="color:#ae81ff">2</span>, <span style="color:#e6db74">&#34;0&#34;</span>) <span style="color:#f92672">+</span> <span style="color:#e6db74">&#34;分&#34;</span>;
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> timerPickerSecond(<span style="color:#66d9ef">int</span> second) {
    <span style="color:#66d9ef">return</span> second.toString().padLeft(<span style="color:#ae81ff">2</span>, <span style="color:#e6db74">&#34;0&#34;</span>);
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">String</span> timerPickerSecondLabel(<span style="color:#66d9ef">int</span> second) {
    <span style="color:#66d9ef">return</span> second.toString().padLeft(<span style="color:#ae81ff">2</span>, <span style="color:#e6db74">&#34;0&#34;</span>) <span style="color:#f92672">+</span> <span style="color:#e6db74">&#34;秒&#34;</span>;
  }

  <span style="color:#66d9ef">static</span> <span style="color:#66d9ef">const</span> LocalizationsDelegate<span style="color:#f92672">&lt;</span>CupertinoLocalizations<span style="color:#f92672">&gt;</span> delegate <span style="color:#f92672">=</span>
      _ChineseDelegate();

  <span style="color:#66d9ef">static</span> Future<span style="color:#f92672">&lt;</span>CupertinoLocalizations<span style="color:#f92672">&gt;</span> load(Locale locale) <span style="color:#66d9ef">async</span> {
    <span style="color:#66d9ef">var</span> localizaltions <span style="color:#f92672">=</span> ChineseCupertinoLocalizations();
    <span style="color:#66d9ef">await</span> localizaltions.init();
    <span style="color:#66d9ef">return</span> SynchronousFuture<span style="color:#f92672">&lt;</span>CupertinoLocalizations<span style="color:#f92672">&gt;</span>(localizaltions);
  }
}

<span style="color:#66d9ef">class</span> <span style="color:#a6e22e">_ChineseDelegate</span> <span style="color:#66d9ef">extends</span> LocalizationsDelegate<span style="color:#f92672">&lt;</span>CupertinoLocalizations<span style="color:#f92672">&gt;</span> {
  <span style="color:#66d9ef">const</span> _ChineseDelegate();

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">bool</span> isSupported(Locale locale) {
    <span style="color:#66d9ef">return</span> locale.languageCode <span style="color:#f92672">==</span> <span style="color:#e6db74">&#39;zh&#39;</span>;
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  Future<span style="color:#f92672">&lt;</span>CupertinoLocalizations<span style="color:#f92672">&gt;</span> load(Locale locale) {
    <span style="color:#66d9ef">return</span> ChineseCupertinoLocalizations.load(locale);
  }

  <span style="color:#960050;background-color:#1e0010">@</span>override
  <span style="color:#66d9ef">bool</span> shouldReload(LocalizationsDelegate<span style="color:#f92672">&lt;</span>CupertinoLocalizations<span style="color:#f92672">&gt;</span> old) {
    <span style="color:#66d9ef">return</span> <span style="color:#66d9ef">false</span>;
  }
}

</code></pre></div><p>这个东西弄到项目里</p>
<p>然后在 Application 里配置一下</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart"><span style="color:#66d9ef">class</span> <span style="color:#a6e22e">MyApp</span> <span style="color:#66d9ef">extends</span> StatelessWidget {
  <span style="color:#75715e">// This widget is the root of your application.
</span><span style="color:#75715e"></span>  <span style="color:#960050;background-color:#1e0010">@</span>override
  Widget build(BuildContext context) {
    <span style="color:#66d9ef">return</span> MaterialApp(
      title: <span style="color:#e6db74">&#39;Flutter Demo&#39;</span>,
      theme: ThemeData(
        <span style="color:#75715e">// This is the theme of your application.
</span><span style="color:#75715e"></span>        <span style="color:#75715e">//
</span><span style="color:#75715e"></span>        <span style="color:#75715e">// Try running your application with &#34;flutter run&#34;. You&#39;ll see the
</span><span style="color:#75715e"></span>        <span style="color:#75715e">// application has a blue toolbar. Then, without quitting the app, try
</span><span style="color:#75715e"></span>        <span style="color:#75715e">// changing the primarySwatch below to Colors.green and then invoke
</span><span style="color:#75715e"></span>        <span style="color:#75715e">// &#34;hot reload&#34; (press &#34;r&#34; in the console where you ran &#34;flutter run&#34;,
</span><span style="color:#75715e"></span>        <span style="color:#75715e">// or simply save your changes to &#34;hot reload&#34; in a Flutter IDE).
</span><span style="color:#75715e"></span>        <span style="color:#75715e">// Notice that the counter didn&#39;t reset back to zero; the application
</span><span style="color:#75715e"></span>        <span style="color:#75715e">// is not restarted.
</span><span style="color:#75715e"></span>        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: <span style="color:#e6db74">&#39;Flutter Demo Home Page&#39;</span>),
      localizationsDelegates: <span style="color:#f92672">&lt;</span>LocalizationsDelegate<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;&gt;</span>[
        ChineseCupertinoLocalizations.delegate, <span style="color:#75715e">// 这里加上这个,是自定义的delegate
</span><span style="color:#75715e"></span>
        DefaultCupertinoLocalizations.delegate, <span style="color:#75715e">// 这个截止目前只包含英文
</span><span style="color:#75715e"></span>
        <span style="color:#75715e">// 下面两个是Material widgets的delegate, 包含中文
</span><span style="color:#75715e"></span>        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
      ],
      supportedLocales: [
        <span style="color:#66d9ef">const</span> Locale(<span style="color:#e6db74">&#39;en&#39;</span>, <span style="color:#e6db74">&#39;US&#39;</span>), <span style="color:#75715e">// English
</span><span style="color:#75715e"></span>        <span style="color:#66d9ef">const</span> Locale(<span style="color:#e6db74">&#39;zh&#39;</span>, <span style="color:#e6db74">&#39;Hans&#39;</span>), <span style="color:#75715e">// China
</span><span style="color:#75715e"></span>        <span style="color:#66d9ef">const</span> Locale(<span style="color:#e6db74">&#39;zh&#39;</span>, <span style="color:#e6db74">&#39;&#39;</span>), <span style="color:#75715e">// China
</span><span style="color:#75715e"></span>        <span style="color:#75715e">// ... other locales the app supports
</span><span style="color:#75715e"></span>      ],
    );
  }
}
</code></pre></div><p>这样就能完成默认的中文的本地化,当然之前那个 Cupertino 的 delegate 实际上也是借助了 Material 中的 delegate 本地化</p>
<p>这里还要注意,一定要保证你的设备是本地语言是中文(因为很多朋友是使用模拟器开发的,默认是英文)</p>
<h2 id="原因分析">原因分析</h2>
<p>这里要解析一波源码了,为什么会出现这种情况呢</p>
<p>主要原因就是在某个版本,加入了一整套的 Cupertino 相关的支持,但是又因为某些原因遗忘了非英文版本,造成了默认的情况下,不包含其他语言</p>
<p>而在未设置对应语言的 delegate 时,又没有一个默认的 delegate,从而造成空指针异常,进而抛出错误</p>
<h2 id="源码解析">源码解析</h2>
<p><img src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&amp;path=%2F20190109135322.png&amp;versionDescriptor%5BversionOptions%5D=0&amp;versionDescriptor%5BversionType%5D=0&amp;resolveLfs=true&amp;%24format=octetStream&amp;api-version=5.0" alt="20190109135322.png"></p>
<p>这个是 Cupertino 中,弹出剪切/复制/粘贴/全选那个按钮那个 toolbar 的配置界面,这里会使用到这个类,然而又因为得到的是空的,所以会报空指针异常</p>
<p>而获取的方式是使用<code>CupertinoLocalizations.of(context);</code>的方式</p>
<p>查看这个方法的定义处又可以跟踪到另一个地方</p>
<p><img src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&amp;path=%2F20190109135531.png&amp;versionDescriptor%5BversionOptions%5D=0&amp;versionDescriptor%5BversionType%5D=0&amp;resolveLfs=true&amp;%24format=octetStream&amp;api-version=5.0" alt="20190109135531.png"></p>
<p><img src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&amp;path=%2F20190109135615.png&amp;versionDescriptor%5BversionOptions%5D=0&amp;versionDescriptor%5BversionType%5D=0&amp;resolveLfs=true&amp;%24format=octetStream&amp;api-version=5.0" alt="20190109135615.png"></p>
<p>然后来到这段代码</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-dart" data-lang="dart">Future<span style="color:#f92672">&lt;</span>Map<span style="color:#f92672">&lt;</span>Type, <span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;&gt;</span> _loadAll(Locale locale, Iterable<span style="color:#f92672">&lt;</span>LocalizationsDelegate<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;&gt;</span> allDelegates) {
  <span style="color:#66d9ef">final</span> Map<span style="color:#f92672">&lt;</span>Type, <span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;</span> output <span style="color:#f92672">=</span> <span style="color:#f92672">&lt;</span>Type, <span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;</span>{};
  List<span style="color:#f92672">&lt;</span>_Pending<span style="color:#f92672">&gt;</span> pendingList;

  <span style="color:#75715e">// Only load the first delegate for each delegate type that supports
</span><span style="color:#75715e"></span>  <span style="color:#75715e">// locale.languageCode.
</span><span style="color:#75715e"></span>  <span style="color:#66d9ef">final</span> Set<span style="color:#f92672">&lt;</span>Type<span style="color:#f92672">&gt;</span> types <span style="color:#f92672">=</span> Set<span style="color:#f92672">&lt;</span>Type<span style="color:#f92672">&gt;</span>();
  <span style="color:#66d9ef">final</span> List<span style="color:#f92672">&lt;</span>LocalizationsDelegate<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;&gt;</span> delegates <span style="color:#f92672">=</span> <span style="color:#f92672">&lt;</span>LocalizationsDelegate<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;&gt;</span>[];
  <span style="color:#66d9ef">for</span> (LocalizationsDelegate<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;</span> delegate <span style="color:#66d9ef">in</span> allDelegates) {
    <span style="color:#66d9ef">if</span> (<span style="color:#f92672">!</span>types.contains(delegate.type) <span style="color:#f92672">&amp;&amp;</span> delegate.isSupported(locale)) {
      types.add(delegate.type);
      delegates.add(delegate);
    }
  }

  <span style="color:#66d9ef">for</span> (LocalizationsDelegate<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;</span> delegate <span style="color:#66d9ef">in</span> delegates) {
    <span style="color:#66d9ef">final</span> Future<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;</span> inputValue <span style="color:#f92672">=</span> delegate.load(locale);
    <span style="color:#66d9ef">dynamic</span> completedValue;
    <span style="color:#66d9ef">final</span> Future<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;</span> futureValue <span style="color:#f92672">=</span> inputValue.then<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;</span>((<span style="color:#66d9ef">dynamic</span> value) {
      <span style="color:#66d9ef">return</span> completedValue <span style="color:#f92672">=</span> value;
    });
    <span style="color:#66d9ef">if</span> (completedValue <span style="color:#f92672">!=</span> <span style="color:#66d9ef">null</span>) { <span style="color:#75715e">// inputValue was a SynchronousFuture
</span><span style="color:#75715e"></span>      <span style="color:#66d9ef">final</span> Type type <span style="color:#f92672">=</span> delegate.type;
      <span style="color:#66d9ef">assert</span>(<span style="color:#f92672">!</span>output.containsKey(type));
      output[type] <span style="color:#f92672">=</span> completedValue;
    } <span style="color:#66d9ef">else</span> {
      pendingList <span style="color:#f92672">??=</span> <span style="color:#f92672">&lt;</span>_Pending<span style="color:#f92672">&gt;</span>[];
      pendingList.add(_Pending(delegate, futureValue));
    }
  }

  <span style="color:#75715e">// All of the delegate.load() values were synchronous futures, we&#39;re done.
</span><span style="color:#75715e"></span>  <span style="color:#66d9ef">if</span> (pendingList <span style="color:#f92672">==</span> <span style="color:#66d9ef">null</span>)
    <span style="color:#66d9ef">return</span> SynchronousFuture<span style="color:#f92672">&lt;</span>Map<span style="color:#f92672">&lt;</span>Type, <span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;&gt;</span>(output);

  <span style="color:#75715e">// Some of delegate.load() values were asynchronous futures. Wait for them.
</span><span style="color:#75715e"></span>  <span style="color:#66d9ef">return</span> Future.wait<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;</span>(pendingList.map<span style="color:#f92672">&lt;</span>Future<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;&gt;</span>((_Pending p) <span style="color:#f92672">=&gt;</span> p.futureValue))
    .then<span style="color:#f92672">&lt;</span>Map<span style="color:#f92672">&lt;</span>Type, <span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;&gt;</span>((List<span style="color:#f92672">&lt;</span><span style="color:#66d9ef">dynamic</span><span style="color:#f92672">&gt;</span> values) {
      <span style="color:#66d9ef">assert</span>(values.length <span style="color:#f92672">==</span> pendingList.length);
      <span style="color:#66d9ef">for</span> (<span style="color:#66d9ef">int</span> i <span style="color:#f92672">=</span> <span style="color:#ae81ff">0</span>; i <span style="color:#f92672">&lt;</span> values.length; i <span style="color:#f92672">+=</span> <span style="color:#ae81ff">1</span>) {
        <span style="color:#66d9ef">final</span> Type type <span style="color:#f92672">=</span> pendingList[i].delegate.type;
        <span style="color:#66d9ef">assert</span>(<span style="color:#f92672">!</span>output.containsKey(type));
        output[type] <span style="color:#f92672">=</span> values[i];
      }
      <span style="color:#66d9ef">return</span> output;
    });
}
</code></pre></div><p>简单来说,这个方法是根据本地的语言读取所有支持这个语言的 delegate</p>
<p>然后问题来了, 没读取到怎么办呢</p>
<p>有几处代码需要关注一下</p>
<ol>
<li>
<p><img src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&amp;path=%2F20190109143609.png&amp;versionDescriptor%5BversionOptions%5D=0&amp;versionDescriptor%5BversionType%5D=0&amp;resolveLfs=true&amp;%24format=octetStream&amp;api-version=5.0" alt="20190109143609.png"></p>
</li>
<li>
<p><img src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&amp;path=%2F20190109143806.png&amp;versionDescriptor%5BversionOptions%5D=0&amp;versionDescriptor%5BversionType%5D=0&amp;resolveLfs=true&amp;%24format=octetStream&amp;api-version=5.0" alt="20190109143806.png"></p>
</li>
<li>
<p><img src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&amp;path=%2F20190109144442.png&amp;versionDescriptor%5BversionOptions%5D=0&amp;versionDescriptor%5BversionType%5D=0&amp;resolveLfs=true&amp;%24format=octetStream&amp;api-version=5.0" alt="20190109144442.png"></p>
</li>
</ol>
<p>这里就看出来了,为什么会有空指针异常的原因 3 =&gt; 2 =&gt; 1 但是 1 也没读取到 ,自然就空指针了</p>
<h2 id="后记">后记</h2>
<p>本篇介绍了解决方案 <code>pastelabel</code> <code>copylabel</code> 各种 label 空指针的原因和解决方案</p>

                        </div>

                        

<div class="post-archive">
    <h2>See Also</h2>
    <ul class="listing">
        
        <li><a href="/posts/flutter/android/finish-activity/">Finish FlutterActivity 源码解析</a></li>
        
        <li><a href="/posts/flutter/flutter-bootom-sheet/">Flutter bottomSheet的使用</a></li>
        
        <li><a href="/posts/flutter/http/flutter-http1/">flutter http框架简介(1)</a></li>
        
        <li><a href="/posts/flutter/flutter-arm64-crash/">Flutter 1.0.0 打包apk后运行错误</a></li>
        
        <li><a href="/posts/flutter/channel/flutter-channel4/">Flutter 原生通信 (四) - iOS 通知 Flutter</a></li>
        
    </ul>
</div>


                        <div class="post-meta meta-tags">
                            
                            <ul class="clearfix">
                                
                                <li><a href="http://www.kikt.top/tags/cupertino">cupertino</a></li>
                                
                                <li><a href="http://www.kikt.top/tags/flutter">flutter</a></li>
                                
                            </ul>
                            
                        </div>
                    </article>
                    
    

    
    
    <div class="post bg-white">
      <script src="https://utteranc.es/client.js"
            repo= "caijinglong/kikt-blog-comment"
            issue-term="pathname"
            theme="github-light"
            crossorigin="anonymous"
            async>
      </script>
    </div>
    
                </div>
            </div>
            <div id="secondary">
    <section class="widget">
        <form id="search" action="//www.google.com/search" method="get" accept-charset="utf-8" target="_blank" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
      <input type="hidden" name="sitesearch" value="http://www.kikt.top">
      <button type="submit" class="submit icon-search"></button>
</form>
    </section>
    
    <section class="widget">
        <h3 class="widget-title">最近文章</h3>
<ul class="widget-list">
    
    <li>
        <a href="http://www.kikt.top/posts/java/crack/crack1/" title="使用javassist,修改jar包方法实现">使用javassist,修改jar包方法实现</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/github/actions/create/" title="Github action 的开发到发布">Github action 的开发到发布</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/jenkins&#43;fastlane/" title="flutter Jenkins&#43;fastlane 自动化打测试包, 并上传蒲公英">flutter Jenkins&#43;fastlane 自动化打测试包, 并上传蒲公英</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/go/compile-for-android/" title="编译 go 源码为 android 动态库(so)">编译 go 源码为 android 动态库(so)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/focusnode-2/" title="Flutter FocusNode 焦点那点事-(二)">Flutter FocusNode 焦点那点事-(二)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/focusnode-1/" title="Flutter FocusNode 焦点那点事-(一)">Flutter FocusNode 焦点那点事-(一)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/server/caddy/cros_for_local_dev/" title="用 Caddy 解决 web 开发中本地跨域的问题">用 Caddy 解决 web 开发中本地跨域的问题</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/route/navigator-helper2/" title="Navigator Helper2">Navigator Helper2</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/grey-app/" title="flutter 怎么实现app整体灰度">flutter 怎么实现app整体灰度</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/plugin/flutter-sdk-import-aar/" title="Flutter 插件开发之引入aar到安卓部分 并使用本地maven">Flutter 插件开发之引入aar到安卓部分 并使用本地maven</a>
    </li>
    
</ul>
    </section>

    

    <section class="widget">
        <h3 class="widget-title">分类</h3>
<ul class="widget-list">
    
    <li>
        <a href="http://www.kikt.top/categories/android/">android(25)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/caddy/">caddy(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/dart/">dart(5)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/docker/">docker(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/flutter/">flutter(60)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/github/">github(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/go/">go(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/golang/">golang(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/iOS/">iOS(6)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/ios/">ios(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/java/">java(6)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/jetbrains/">jetbrains(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/other/">other(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/python/">python(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/server/">server(5)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/spring/">spring(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/tools/">tools(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/%E6%9D%82%E9%A1%B9/">杂项(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/%E6%B6%82%E9%B8%A6/">涂鸦(1)</a>
    </li>
    
</ul>
    </section>

    <section class="widget">
        <h3 class="widget-title">标签</h3>
<div class="tagcloud">
    
    <a href="http://www.kikt.top/tags/10/">10</a>
    
    <a href="http://www.kikt.top/tags/2.3/">2.3</a>
    
    <a href="http://www.kikt.top/tags/Clipboard/">Clipboard</a>
    
    <a href="http://www.kikt.top/tags/Javassist/">Javassist</a>
    
    <a href="http://www.kikt.top/tags/Migrate/">Migrate</a>
    
    <a href="http://www.kikt.top/tags/aar/">aar</a>
    
    <a href="http://www.kikt.top/tags/actions/">actions</a>
    
    <a href="http://www.kikt.top/tags/aidl/">aidl</a>
    
    <a href="http://www.kikt.top/tags/android/">android</a>
    
    <a href="http://www.kikt.top/tags/androidQ/">androidQ</a>
    
    <a href="http://www.kikt.top/tags/androidX/">androidX</a>
    
    <a href="http://www.kikt.top/tags/apk/">apk</a>
    
    <a href="http://www.kikt.top/tags/app/">app</a>
    
    <a href="http://www.kikt.top/tags/appcode/">appcode</a>
    
    <a href="http://www.kikt.top/tags/azure/">azure</a>
    
    <a href="http://www.kikt.top/tags/ble/">ble</a>
    
    <a href="http://www.kikt.top/tags/bottomsheet/">bottomsheet</a>
    
    <a href="http://www.kikt.top/tags/butterknife/">butterknife</a>
    
    <a href="http://www.kikt.top/tags/c/">c</a>
    
    <a href="http://www.kikt.top/tags/caddy/">caddy</a>
    
    <a href="http://www.kikt.top/tags/camera/">camera</a>
    
    <a href="http://www.kikt.top/tags/cameraX/">cameraX</a>
    
    <a href="http://www.kikt.top/tags/channel/">channel</a>
    
    <a href="http://www.kikt.top/tags/cocoapods/">cocoapods</a>
    
    <a href="http://www.kikt.top/tags/cupertino/">cupertino</a>
    
    <a href="http://www.kikt.top/tags/dart/">dart</a>
    
    <a href="http://www.kikt.top/tags/dart-2.6/">dart-2.6</a>
    
    <a href="http://www.kikt.top/tags/desktop/">desktop</a>
    
    <a href="http://www.kikt.top/tags/dialog/">dialog</a>
    
    <a href="http://www.kikt.top/tags/dmg/">dmg</a>
    
    <a href="http://www.kikt.top/tags/doc/">doc</a>
    
    <a href="http://www.kikt.top/tags/docker/">docker</a>
    
    <a href="http://www.kikt.top/tags/docker-compose/">docker-compose</a>
    
    <a href="http://www.kikt.top/tags/excel/">excel</a>
    
    <a href="http://www.kikt.top/tags/exists/">exists</a>
    
    <a href="http://www.kikt.top/tags/faq/">faq</a>
    
    <a href="http://www.kikt.top/tags/fastlane/">fastlane</a>
    
    <a href="http://www.kikt.top/tags/ffi/">ffi</a>
    
    <a href="http://www.kikt.top/tags/ffmpeg/">ffmpeg</a>
    
    <a href="http://www.kikt.top/tags/flexmark/">flexmark</a>
    
    <a href="http://www.kikt.top/tags/flutter/">flutter</a>
    
    <a href="http://www.kikt.top/tags/flutter-web/">flutter-web</a>
    
    <a href="http://www.kikt.top/tags/focus/">focus</a>
    
    <a href="http://www.kikt.top/tags/focusNode/">focusNode</a>
    
    <a href="http://www.kikt.top/tags/form/">form</a>
    
    <a href="http://www.kikt.top/tags/framework/">framework</a>
    
    <a href="http://www.kikt.top/tags/github/">github</a>
    
    <a href="http://www.kikt.top/tags/go/">go</a>
    
    <a href="http://www.kikt.top/tags/golang/">golang</a>
    
    <a href="http://www.kikt.top/tags/gradle/">gradle</a>
    
    <a href="http://www.kikt.top/tags/http/">http</a>
    
    <a href="http://www.kikt.top/tags/iOS/">iOS</a>
    
    <a href="http://www.kikt.top/tags/ide/">ide</a>
    
    <a href="http://www.kikt.top/tags/idea/">idea</a>
    
    <a href="http://www.kikt.top/tags/index/">index</a>
    
    <a href="http://www.kikt.top/tags/inside/">inside</a>
    
    <a href="http://www.kikt.top/tags/ios/">ios</a>
    
    <a href="http://www.kikt.top/tags/java/">java</a>
    
    <a href="http://www.kikt.top/tags/jenkins/">jenkins</a>
    
    <a href="http://www.kikt.top/tags/jetbrains/">jetbrains</a>
    
    <a href="http://www.kikt.top/tags/jsdelivr/">jsdelivr</a>
    
    <a href="http://www.kikt.top/tags/json/">json</a>
    
    <a href="http://www.kikt.top/tags/json_serializable/">json_serializable</a>
    
    <a href="http://www.kikt.top/tags/junit/">junit</a>
    
    <a href="http://www.kikt.top/tags/library/">library</a>
    
    <a href="http://www.kikt.top/tags/live-template/">live-template</a>
    
    <a href="http://www.kikt.top/tags/loadmore/">loadmore</a>
    
    <a href="http://www.kikt.top/tags/log/">log</a>
    
    <a href="http://www.kikt.top/tags/mac/">mac</a>
    
    <a href="http://www.kikt.top/tags/macos/">macos</a>
    
    <a href="http://www.kikt.top/tags/maven/">maven</a>
    
    <a href="http://www.kikt.top/tags/mysql/">mysql</a>
    
    <a href="http://www.kikt.top/tags/navigationbar/">navigationbar</a>
    
    <a href="http://www.kikt.top/tags/navigator/">navigator</a>
    
    <a href="http://www.kikt.top/tags/ndk/">ndk</a>
    
    <a href="http://www.kikt.top/tags/nginx/">nginx</a>
    
    <a href="http://www.kikt.top/tags/oc/">oc</a>
    
    <a href="http://www.kikt.top/tags/opencv/">opencv</a>
    
    <a href="http://www.kikt.top/tags/poi/">poi</a>
    
    <a href="http://www.kikt.top/tags/pub/">pub</a>
    
    <a href="http://www.kikt.top/tags/python/">python</a>
    
    <a href="http://www.kikt.top/tags/retrofit/">retrofit</a>
    
    <a href="http://www.kikt.top/tags/route/">route</a>
    
    <a href="http://www.kikt.top/tags/server/">server</a>
    
    <a href="http://www.kikt.top/tags/so/">so</a>
    
    <a href="http://www.kikt.top/tags/spp/">spp</a>
    
    <a href="http://www.kikt.top/tags/sprintboot/">sprintboot</a>
    
    <a href="http://www.kikt.top/tags/swift/">swift</a>
    
    <a href="http://www.kikt.top/tags/tap/">tap</a>
    
    <a href="http://www.kikt.top/tags/thymeleaf/">thymeleaf</a>
    
    <a href="http://www.kikt.top/tags/tips/">tips</a>
    
    <a href="http://www.kikt.top/tags/toast/">toast</a>
    
    <a href="http://www.kikt.top/tags/transition/">transition</a>
    
    <a href="http://www.kikt.top/tags/ui/">ui</a>
    
    <a href="http://www.kikt.top/tags/utf8/">utf8</a>
    
    <a href="http://www.kikt.top/tags/yield/">yield</a>
    
    <a href="http://www.kikt.top/tags/%E4%BA%8C%E8%BF%9B%E5%88%B6/">二进制</a>
    
    <a href="http://www.kikt.top/tags/%E4%BA%A4%E5%8F%89/">交叉</a>
    
    <a href="http://www.kikt.top/tags/%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91/">交叉编译</a>
    
    <a href="http://www.kikt.top/tags/%E4%BB%8B%E7%BB%8D/">介绍</a>
    
    <a href="http://www.kikt.top/tags/%E4%BB%A3%E7%A0%81%E8%A7%84%E8%8C%83/">代码规范</a>
    
    <a href="http://www.kikt.top/tags/%E5%86%B2%E7%AA%81/">冲突</a>
    
    <a href="http://www.kikt.top/tags/%E5%8A%A8%E6%80%81/">动态</a>
    
    <a href="http://www.kikt.top/tags/%E5%8F%91%E5%B8%83/">发布</a>
    
    <a href="http://www.kikt.top/tags/%E5%8F%AF%E6%89%A7%E8%A1%8C/">可执行</a>
    
    <a href="http://www.kikt.top/tags/%E5%9B%BE%E5%BA%8A/">图床</a>
    
    <a href="http://www.kikt.top/tags/%E5%9F%8E%E5%B8%82/">城市</a>
    
    <a href="http://www.kikt.top/tags/%E5%A4%A7%E6%96%87%E4%BB%B6/">大文件</a>
    
    <a href="http://www.kikt.top/tags/%E5%B7%A5%E5%85%B7/">工具</a>
    
    <a href="http://www.kikt.top/tags/%E5%B7%B2%E6%9C%89%E9%A1%B9%E7%9B%AE/">已有项目</a>
    
    <a href="http://www.kikt.top/tags/%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/">开发环境</a>
    
    <a href="http://www.kikt.top/tags/%E6%80%BB%E7%BB%93/">总结</a>
    
    <a href="http://www.kikt.top/tags/%E6%85%A2/">慢</a>
    
    <a href="http://www.kikt.top/tags/%E6%89%93%E5%8C%85/">打包</a>
    
    <a href="http://www.kikt.top/tags/%E6%89%AB%E7%A0%81/">扫码</a>
    
    <a href="http://www.kikt.top/tags/%E6%8F%92%E4%BB%B6/">插件</a>
    
    <a href="http://www.kikt.top/tags/%E6%96%87%E6%A1%A3/">文档</a>
    
    <a href="http://www.kikt.top/tags/%E6%A8%A1%E6%9D%BF/">模板</a>
    
    <a href="http://www.kikt.top/tags/%E6%B8%B2%E6%9F%93/">渲染</a>
    
    <a href="http://www.kikt.top/tags/%E6%BA%90%E7%A0%81%E8%A7%A3%E6%9E%90/">源码解析</a>
    
    <a href="http://www.kikt.top/tags/%E7%81%B0%E5%BA%A6/">灰度</a>
    
    <a href="http://www.kikt.top/tags/%E7%82%B9%E5%87%BB/">点击</a>
    
    <a href="http://www.kikt.top/tags/%E7%84%A6%E7%82%B9/">焦点</a>
    
    <a href="http://www.kikt.top/tags/%E7%88%AC%E8%99%AB/">爬虫</a>
    
    <a href="http://www.kikt.top/tags/%E7%8A%B6%E6%80%81%E7%AE%A1%E7%90%86/">状态管理</a>
    
    <a href="http://www.kikt.top/tags/%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BE/">百度地图</a>
    
    <a href="http://www.kikt.top/tags/%E7%BC%96%E7%A0%81/">编码</a>
    
    <a href="http://www.kikt.top/tags/%E7%BC%96%E7%A8%8B%E6%8A%80%E5%B7%A7/">编程技巧</a>
    
    <a href="http://www.kikt.top/tags/%E7%BC%96%E8%AF%91/">编译</a>
    
    <a href="http://www.kikt.top/tags/%E7%BF%BB%E8%AF%91/">翻译</a>
    
    <a href="http://www.kikt.top/tags/%E8%93%9D%E7%89%99/">蓝牙</a>
    
    <a href="http://www.kikt.top/tags/%E8%A1%A8%E5%8D%95/">表单</a>
    
    <a href="http://www.kikt.top/tags/%E8%B7%AF%E7%94%B1/">路由</a>
    
    <a href="http://www.kikt.top/tags/%E8%BF%87%E5%9C%BA%E5%8A%A8%E7%94%BB/">过场动画</a>
    
    <a href="http://www.kikt.top/tags/%E9%9A%90%E7%A7%81/">隐私</a>
    
</div>
    </section>

    
<section class="widget">
    <h3 class="widget-title">友情链接</h3>
    <ul class="widget-list">
        
        <li>
            <a target="_blank" href="https://github.com/Caijinglong" title="我的Github">我的Github</a>
        </li>
        
        <li>
            <a target="_blank" href="https://flutter.dev" title="flutter 官网">flutter 官网</a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title">其它</h3>
        <ul class="widget-list">
            <li><a href="http://www.kikt.top/index.xml">文章 RSS</a></li>
        </ul>
    </section>
</div>
        </div>
    </div>
</div>
<footer id="footer">
    <div class="container">
        <div>
            <p>如果我的blog对您有帮助,而您愿意捐赠 😆, 可以用下面的二维码</p>
            <img style="width:5rem;" src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&resolveLfs=true&%24format=octetStream&api-version=5.0&path=%2F20190424141834.png"/>
            <img style="width:5rem; padding-left: 2rem;" 
            src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&resolveLfs=true&%24format=octetStream&api-version=5.0&path=%2F20190424141931.png"/>
            <img style="width:5rem; padding-left: 2rem;" 
            src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&resolveLfs=true&%24format=octetStream&api-version=5.0&path=%2F20190424142013.png"/>
        </div>
        &copy; 2018 <a href="http://www.kikt.top">caijinglong的博客 By caijinglong</a>.
        Powered by <a rel="nofollow noreferer noopener" href="https://gohugo.io" target="_blank">Hugo</a>.
        <a href="http://www.flysnow.org/" target="_blank">Theme</a> based on <a href="https://github.com/rujews/maupassant-hugo" target="_blank">maupassant</a>.<br/>
        本站所有内容基于<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" style="color:coral">CC4.0</a>协议发布,需要转载必须署名
        <br/>
        如果有问题可以<a href="mailto:cjl_spy@163.com">email联系我</a>
        <br/>
        京ICP备18038473号-1
        
    </div>
</footer>


    <script type="text/javascript" src="/js/prism.js" async="true"></script>
    <script type="text/javascript">
    
    (function(){
        $("pre code").parent().addClass("line-numbers")
    }())

    window.MathJax = {
        tex2jax: {
            inlineMath: [ ['$','$'] ],
            processEscapes: true
        }
    };
    </script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script>

<a id="rocket" href="#top"></a>
<script type="text/javascript" src="/js/totop.js?v=0.0.0" async=""></script>



<script type="text/javascript" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" async></script>




</body>
</html>
